home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11296 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 75 73 69 6e 74 65 72 6e | 65 74 2e 63 6f 6d 21 6e |usintern|et.com!n|
|00000030| 6f 74 2d 66 6f 72 2d 6d | 61 69 6c 0a 46 72 6f 6d |ot-for-m|ail.From|
|00000040| 3a 20 22 4c 75 6b 65 20 | 4a 2e 20 42 75 63 6b 6c |: "Luke |J. Buckl|
|00000050| 69 6e 22 20 3c 6c 62 75 | 63 6b 6c 69 6e 40 6d 61 |in" <lbu|cklin@ma|
|00000060| 69 6c 2e 75 73 69 6e 74 | 65 72 6e 65 74 2e 63 6f |il.usint|ernet.co|
|00000070| 6d 3e 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |m>.Subje|ct: Re: |
|00000080| 52 61 6e 64 6f 6d 20 46 | 69 6c 65 20 41 63 63 65 |Random F|ile Acce|
|00000090| 73 73 20 28 66 73 74 72 | 65 61 6d 29 0a 4d 65 73 |ss (fstr|eam).Mes|
|000000a0| 73 61 67 65 2d 49 44 3a | 20 3c 33 64 37 63 63 24 |sage-ID:| <3d7cc$|
|000000b0| 64 33 36 33 32 2e 31 34 | 61 40 75 73 69 6e 74 65 |d3632.14|a@usinte|
|000000c0| 72 6e 65 74 2e 63 6f 6d | 3e 0a 44 61 74 65 3a 20 |rnet.com|>.Date: |
|000000d0| 57 65 64 2c 20 31 33 20 | 4d 61 72 20 31 39 39 36 |Wed, 13 |Mar 1996|
|000000e0| 20 31 39 3a 35 34 3a 35 | 30 20 47 4d 54 0a 4f 72 | 19:54:5|0 GMT.Or|
|000000f0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 4d 61 6e 61 |ganizati|on: Mana|
|00000100| 67 65 6d 65 6e 74 20 43 | 6f 6d 70 75 74 65 72 20 |gement C|omputer |
|00000110| 53 6f 6c 75 74 69 6f 6e | 73 0a 58 2d 4d 61 69 6c |Solution|s.X-Mail|
|00000120| 65 72 3a 20 4d 6f 7a 69 | 6c 6c 61 20 31 2e 32 32 |er: Mozi|lla 1.22|
|00000130| 20 28 57 69 6e 64 6f 77 | 73 3b 20 55 3b 20 31 36 | (Window|s; U; 16|
|00000140| 62 69 74 29 0a 4d 49 4d | 45 2d 56 65 72 73 69 6f |bit).MIM|E-Versio|
|00000150| 6e 3a 20 31 2e 30 0a 54 | 6f 3a 20 62 6a 32 40 75 |n: 1.0.T|o: bj2@u|
|00000160| 6b 63 2e 61 63 2e 75 6b | 0a 52 65 66 65 72 65 6e |kc.ac.uk|.Referen|
|00000170| 63 65 73 3a 20 3c 31 32 | 37 30 38 40 66 61 6c 63 |ces: <12|708@falc|
|00000180| 6f 6e 2e 75 6b 63 2e 61 | 63 2e 75 6b 3e 0a 43 6f |on.ukc.a|c.uk>.Co|
|00000190| 6e 74 65 6e 74 2d 54 72 | 61 6e 73 66 65 72 2d 45 |ntent-Tr|ansfer-E|
|000001a0| 6e 63 6f 64 69 6e 67 3a | 20 37 62 69 74 0a 43 6f |ncoding:| 7bit.Co|
|000001b0| 6e 74 65 6e 74 2d 54 79 | 70 65 3a 20 74 65 78 74 |ntent-Ty|pe: text|
|000001c0| 2f 70 6c 61 69 6e 3b 20 | 63 68 61 72 73 65 74 3d |/plain; |charset=|
|000001d0| 75 73 2d 61 73 63 69 69 | 0a 0a 62 6a 32 40 75 6b |us-ascii|..bj2@uk|
|000001e0| 63 2e 61 63 2e 75 6b 20 | 28 42 2e 4a 75 72 79 29 |c.ac.uk |(B.Jury)|
|000001f0| 20 77 72 6f 74 65 3a 0a | 3e 43 61 6e 20 61 6e 79 | wrote:.|>Can any|
|00000200| 6f 65 20 70 6c 65 61 73 | 65 20 74 65 6c 6c 20 6d |oe pleas|e tell m|
|00000210| 65 20 77 68 79 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |e why th|e follow|
|00000220| 69 6e 67 20 70 72 6f 67 | 72 61 6d 20 64 6f 65 73 |ing prog|ram does|
|00000230| 20 6e 6f 74 20 77 6f 72 | 6b 20 61 74 20 61 6c 6c | not wor|k at all|
|00000240| 3f 3f 0a 3e 0a 3e 69 6e | 74 20 74 65 73 74 28 69 |??.>.>in|t test(i|
|00000250| 6e 74 20 70 6f 73 29 20 | 7b 0a 3e 09 64 61 74 61 |nt pos) |{.>.data|
|00000260| 73 74 72 75 63 74 09 74 | 65 6d 70 3b 0a 3e 0a 3e |struct.t|emp;.>.>|
|00000270| 09 6f 66 73 74 72 65 61 | 6d 20 6f 75 74 70 75 74 |.ofstrea|m output|
|00000280| 28 22 46 69 6c 65 2e 42 | 69 6e 22 2c 69 6f 73 3a |("File.B|in",ios:|
|00000290| 3a 61 74 65 29 3b 0a 3e | 09 69 66 20 28 21 6f 75 |:ate);.>|.if (!ou|
|000002a0| 74 70 75 74 29 20 7b 20 | 72 65 74 75 72 6e 20 31 |tput) { |return 1|
|000002b0| 3b 20 7d 0a 3e 0a 3e 09 | 6f 75 74 70 75 74 2e 73 |; }.>.>.|output.s|
|000002c0| 65 65 6b 70 28 70 6f 73 | 2a 73 69 7a 65 6f 66 28 |eekp(pos|*sizeof(|
|000002d0| 74 65 6d 70 29 29 3b 0a | 3e 0a 3e 20 09 6f 75 74 |temp));.|>.> .out|
|000002e0| 70 75 74 2e 77 72 69 74 | 65 28 28 63 68 61 72 20 |put.writ|e((char |
|000002f0| 2a 29 26 74 65 6d 70 2c | 73 69 7a 65 6f 66 28 74 |*)&temp,|sizeof(t|
|00000300| 65 6d 70 29 29 3b 0a 3e | 09 0a 3e 09 6f 75 74 70 |emp));.>|..>.outp|
|00000310| 75 74 2e 63 6c 6f 73 65 | 28 29 3b 0a 3e 09 72 65 |ut.close|();.>.re|
|00000320| 74 75 72 6e 20 30 3b 0a | 3e 7d 0a 3e 0a 3e 74 65 |turn 0;.|>}.>.>te|
|00000330| 6c 6c 70 28 29 20 72 65 | 70 6f 72 74 73 20 74 68 |llp() re|ports th|
|00000340| 65 20 70 6f 69 6e 74 65 | 72 20 69 73 20 61 74 20 |e pointe|r is at |
|00000350| 74 68 65 20 63 6f 70 72 | 72 65 63 74 20 70 6c 61 |the copr|rect pla|
|00000360| 63 65 2c 20 61 6e 64 20 | 65 6f 66 28 29 20 61 6c |ce, and |eof() al|
|00000370| 73 6f 0a 3e 69 73 20 4f | 4b 2c 20 73 6f 20 77 68 |so.>is O|K, so wh|
|00000380| 79 20 64 6f 65 73 6e 74 | 20 6f 75 74 70 75 74 2e |y doesnt| output.|
|00000390| 77 72 69 74 65 20 77 72 | 69 74 65 20 74 6f 20 74 |write wr|ite to t|
|000003a0| 68 65 20 66 69 6c 65 3f | 21 3f 20 49 76 65 20 68 |he file?|!? Ive h|
|000003b0| 75 6e 74 65 64 0a 3e 6f | 6e 20 74 68 65 20 57 57 |unted.>o|n the WW|
|000003c0| 57 2c 20 63 61 6e 74 20 | 66 69 6e 64 20 61 6e 79 |W, cant |find any|
|000003d0| 20 65 78 61 6d 70 6c 65 | 20 63 6f 64 65 2c 20 73 | example| code, s|
|000003e0| 6f 20 61 6e 79 20 68 65 | 6c 70 20 77 6f 75 6c 64 |o any he|lp would|
|000003f0| 20 62 65 20 61 70 72 65 | 63 69 61 74 65 64 2e 0a | be apre|ciated..|
|00000400| 3e 0a 59 6f 75 20 6d 69 | 67 68 74 20 74 72 79 20 |>.You mi|ght try |
|00000410| 73 69 7a 65 6f 66 28 64 | 61 74 61 73 74 72 75 63 |sizeof(d|atastruc|
|00000420| 74 29 20 69 6e 73 74 65 | 61 64 20 6f 66 20 73 69 |t) inste|ad of si|
|00000430| 7a 65 6f 66 28 74 65 6d | 70 29 2c 20 77 68 65 72 |zeof(tem|p), wher|
|00000440| 65 20 0a 64 61 74 61 73 | 74 72 75 63 74 20 69 73 |e .datas|truct is|
|00000450| 20 72 65 61 6c 6c 79 20 | 74 68 65 20 74 79 70 65 | really |the type|
|00000460| 2c 20 6e 6f 74 20 74 65 | 6d 70 2e 0a 41 6c 73 6f |, not te|mp..Also|
|00000470| 2c 20 79 6f 75 20 61 72 | 65 20 73 74 61 72 74 69 |, you ar|e starti|
|00000480| 6e 67 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |ng at th|e end of|
|00000490| 20 74 68 65 20 66 69 6c | 65 20 28 69 6f 73 3a 3a | the fil|e (ios::|
|000004a0| 61 74 65 29 2c 20 73 6f | 20 79 6f 75 72 20 73 65 |ate), so| your se|
|000004b0| 65 6b 70 20 0a 73 68 6f | 75 6c 64 20 70 72 6f 62 |ekp .sho|uld prob|
|000004c0| 61 62 6c 79 20 63 61 72 | 72 79 20 61 20 22 77 68 |ably car|ry a "wh|
|000004d0| 65 6e 63 65 22 20 73 70 | 65 63 69 66 69 65 72 20 |ence" sp|ecifier |
|000004e0| 6f 66 20 69 6f 73 3a 3a | 65 6e 64 2e 0a 0a 49 20 |of ios::|end...I |
|000004f0| 68 61 64 20 74 72 6f 75 | 62 6c 65 20 77 69 74 68 |had trou|ble with|
|00000500| 20 69 6f 73 3a 3a 61 74 | 65 20 61 74 20 6f 6e 65 | ios::at|e at one|
|00000510| 20 70 6f 69 6e 74 20 74 | 6f 6f 2c 20 73 6f 20 49 | point t|oo, so I|
|00000520| 20 63 68 61 6e 67 65 64 | 20 69 74 20 74 6f 20 69 | changed| it to i|
|00000530| 6f 73 3a 61 70 70 20 0a | 61 6e 64 20 69 74 20 77 |os:app .|and it w|
|00000540| 6f 72 6b 65 64 20 66 69 | 6e 65 2e 20 20 49 74 20 |orked fi|ne. It |
|00000550| 77 61 73 20 70 72 6f 62 | 61 62 6c 79 20 61 20 6d |was prob|ably a m|
|00000560| 69 73 75 6e 64 65 72 73 | 74 61 6e 64 69 6e 67 20 |isunders|tanding |
|00000570| 6f 6e 20 6d 79 20 70 61 | 72 74 2c 20 62 75 74 20 |on my pa|rt, but |
|00000580| 0a 69 74 20 77 6f 72 6b | 65 64 20 74 68 65 20 6f |.it work|ed the o|
|00000590| 74 68 65 72 20 77 61 79 | 2e 0a 0a 0a 2d 2d 2d 2d |ther way|....----|
|000005a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005c0| 0a 4c 75 6b 65 20 4a 2e | 20 42 75 63 6b 6c 69 6e |.Luke J.| Bucklin|
|000005d0| 0a 4d 61 6e 61 67 65 6d | 65 6e 74 20 43 6f 6d 70 |.Managem|ent Comp|
|000005e0| 75 74 65 72 20 53 6f 6c | 75 74 69 6f 6e 73 2c 20 |uter Sol|utions, |
|000005f0| 49 6e 63 2e 0a 6c 62 75 | 63 6b 6c 69 6e 40 75 73 |Inc..lbu|cklin@us|
|00000600| 69 6e 74 65 72 6e 65 74 | 2e 63 6f 6d 0a 2d 2d 2d |internet|.com.---|
|00000610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000620| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000630| 2d 0a 0a 0a 0a | |-.... | |
+--------+-------------------------+-------------------------+--------+--------+